package com.kclm.mapper.impl;

import com.kclm.mapper.UserMapper;
import com.kclm.pojo.User;
import com.kclm.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @Author : lvhx
 * @Date: 2025/10/28 14:32
 * @Description:
 */
public class UserMapperImpl  /*implements UserMapper*/ {
//    @Override
    public User selectById(Long id) {
        SqlSession sqlSession  = SqlSessionUtil.getSqlSession();
        //执行查询的操作
        User user = sqlSession.selectOne("com.kclm.mapper.UserMapper.selectById", 1L);
        return user;
    }

//    @Override
    public List<User> selectAll() {
        SqlSession sqlSession  = SqlSessionUtil.getSqlSession();
        //执行查询的操作
        List<User> list = sqlSession.selectList("com.kclm.mapper.UserMapper.selectAll");
        return  list;
    }

//    @Override
    public int insert(User user) {
        return 0;
    }
}
